package com.ibeeking.gmc.global.g.rest.controller.v1.feign;

import com.ibeeking.gmc.global.api.common.param.TenantDataPushParam;
import com.ibeeking.gmc.global.g.rest.service.ITenantDataPushService;
import com.ibeeking.nematos.constants.enums.OperateLogTypeEnum;
import com.ibeeking.nematos.log.annotation.Log;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author ibeeking
 */
@RestController
@RequestMapping("/g/dataPush/feign/v1")
public class TenantDataPushFeignController {

    @Resource
    private ITenantDataPushService tenantDataPushServiceImpl;

    @Log(logType = OperateLogTypeEnum.SAVE, describe = "租户数据分发")
    @PostMapping(value = "/pushScript")
    public Boolean pushScript(@RequestBody TenantDataPushParam param) {
        return tenantDataPushServiceImpl.pushScript(param.getIndustry(), param.getModule(), param.getScripts(), param.getTenantIds(), param.getStatus());
    }


}
